#!/bin/bash

#repetitions=959

levelsNumberValues=(50)
fieldSizeValues=(50)
fieldsNumberValues=(5 25 50 100 150 200 250 300 350 400 450 500 550 600 650 700)

repetitions=768 #50 warm up (calculado no for separado)

#fieldSizeValues=(5 100)
#fieldsNumberValues=(5 100)
#levelsNumberValues=(5 100)

fileName=""
FOLDER_NAME=2k_fat;

cd bin;
mkdir $FOLDER_NAME;

#-------------------------------------------------------------------------------

echo "========== FieldSize AND FieldNumber AND LevelsNumber =========="

for i in ${fieldSizeValues[@]}
do
	for j in ${fieldsNumberValues[@]}
	do
		for k in ${levelsNumberValues[@]}
		do
			echo "**** FieldSize = ${i} AND FieldNumber = ${j} AND LevelsNumber = ${k} ****"
			filename="result_criaJSON_2k_size-${i}_Fields-${j}_levels-${k}"
			echo "filename: $filename"

			for a in `seq 50`
			do
				java -cp .:../lib/json_org.jar test.CriaJSON ${j} ${k} ${i} >> "${FOLDER_NAME}/${filename}_warm"
			done

			for a in `seq $repetitions`
			do
				java -cp .:../lib/json_org.jar test.CriaJSON ${j} ${k} ${i} >> "${FOLDER_NAME}/$filename"
			done
		done
	done
done

#-------------------------------------------------------------------------------
